#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <stdlib.h>
#include <string.h>


void leftrot(char str[],int n) {

	int len = strlen(str);
	for (int i = 0; i < n; i++) {
		char ch = str[0];
		for (int j = 1; j < len; j++) {
			str[j - 1] = str[j];
		}
		str[len-1] = ch;
	}
	printf("%s\r\n", str);
}

int mystrlen(const char* str) {

	char* st = str;

	while (*st)
		st++;
	return st - str;
}
int main()
{

	/*int n = 0x11223344;
	int* pi = &n;
	*pi = 0;*/

	/*int n = 0x11223344;
	char* pc = (char*)&n;
	*pc = 0;*/

	/*int n = 10;
	char* pc = (char*)&n;
	int* pi = &n;

	printf("%p\n", &n);
	printf("%p\n", pc);
	printf("%p\n", pc + 1);
	printf("%p\n", pi);
	printf("%p\n", pi + 1);*/

	/*int a = 10;
	int* pa = &a;
	char* pc = &a;*/

	/*const int n = 0;
	int* p = &n;
	*p = 20;
	printf("n=%d", n);*/

	/*int n = 20;
	void* p=&n;
	printf("%d", *p);*/

	/*int a = 0x11223344;
	char* pc = (char*)&a;
	*pc = 0;
	printf("%x\n", a);*/

	/*char str[1000];
	int i = 0;

	while ((str[i]= getchar()) != '\n') {
		i++;
	}
	i--;
	
	while (i >= 0) {
		printf("%c", str[i]);
	}*/

	char str[64] = "ABCD";
	/*leftrot(str,1);
	leftrot(str, 1);*/

	printf("%d", mystrlen(str));

	return 0;
}
